package AI;

import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Scanner;

public class NameGenerator 
{
	static ArrayList<String> nameList = new ArrayList<String>();
	
	public static void loadNames()
	{
		Scanner input = new java.util.Scanner(URLClassLoader.getSystemResourceAsStream("Resources/Names.txt"));
		while(input.hasNext())
		{
			nameList.add(input.nextLine());
		}
	}
	public static String generateName()
	{
		int id = (int) (Math.random()*(nameList.size()-1));
		return nameList.get(id);
	}
}
